package com.dashunwms_aohe.controller;

import com.alibaba.fastjson.JSON;
import com.dashunwms_aohe.bean.ds.*;
import com.dashunwms_aohe.http.res.UploadBillRes;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("test")
@Api(tags = "测试")
@Slf4j
public class TestController {

    @PostMapping("/testUploadBillResJson")
    @ApiOperation(value = "测试大舜上传单据返回json", response = UploadBillRes.class)
    public UploadBillRes testUploadBillResJson(@RequestBody UploadBillRes uploadBillRes) {
        log.info("上传采购订单:" + JSON.toJSONString(uploadBillRes));
        return uploadBillRes;

    }


    @PostMapping("/dsResToJosn")
    @ApiOperation(value = "测试大舜上传单据返回json", response = UploadBillRes.class)
    public UploadBillRes dsResToJosn() {
        DS_InStockSHJLRes stockSHJLRes = new DS_InStockSHJLRes();
        log.info("收货记录json:" + JSON.toJSONString(stockSHJLRes));
        DS_InStockYSJLRes dsInStockYSJLRes = new DS_InStockYSJLRes();
        log.info("验收记录json:" + JSON.toJSONString(dsInStockYSJLRes));
        DS_OutStockFHRes dsOutStockFHRes = new DS_OutStockFHRes();
        log.info("出库复核记录json:" + JSON.toJSONString(dsOutStockFHRes));
        DS_StockRes dsStockRes = new DS_StockRes();
        log.info("库存json:" + JSON.toJSONString(dsStockRes));
        DS_WTYSJLRes dsWtysjlRes = new DS_WTYSJLRes();
        log.info("委托运输记录json:" + JSON.toJSONString(dsWtysjlRes));
        return null;

    }
}
